﻿import QtQuick 2.0
import QtQuick.Window 2.12
import ImageItem 1.0
//import PaintItem 1.0

Window{
    id: subWindow
    property int offsetX: 0
    property int offsetY: 0
    property alias imageCutNum: imageItem.cut_num
    property alias imageIndex: imageItem.image_index

    flags: Qt.Window | Qt.FramelessWindowHint

    visible: true
    // x:Screen.virtualX
    // y:Screen.virtualY
    // width: 1080
    // height: 1920 

    ImageItem{
        id:imageItem
        anchors.fill:parent
        visible: swipeView.currentIndex==0 || swipeView.currentIndex== 2
        Connections{
            target: image_manager
            function onSignalCurrentImage(state, image) {
                // console.log("onSignalCurrentImage image_manager.view_state"+image_manager.view_state )
                imageItem.paintFiveSceenImage(image_manager.view_state, image)
            }
        }
    }

    // Component.onCompleted: {
    //     for(var i=0; i < Qt.application.screens.length; i++){
    //         var s = Qt.application.screens[i]
    //         if(s.virtualX === offsetX && s.virtualY === offsetY){
    //             subWindow.screen = Qt.application.screens[i]
    //             break;
    //         }
    //     }
    // }
}


